'''
Shape and color for the control
'''
import pymel as pm
#color for the drawing overide
yellow = 17
violet = 9
brown = 18

def buildCross (name):
    cross = pm.PyNode (pm.curve(point=[(-1, 0, -1), (-1, 0, -3), (1, 0, -3), (1, 0, -1), (3, 0, -1), (3, 0, 1), (1, 0, 1), (1, 0, 3), (-1, 0, 3), (-1, 0, 1), (-3, 0, 1), (-3, 0, -1), (-1, 0, -1)],d=1))
    cross = pm.rename(cross,name)
    return cross

def buildCogCross (name):
        cogCross = pm.PyNode (pm.curve(p=[(-0.448148, 0, -0.137417), (-0.425577, 0, -0.210319), (-0.345762, 0, -0.345408), (-0.210765, 0, -0.425313), (-0.138183, 0, -0.447335),\
                                       (-0.138183, 0, -0.482468), (-0.138183, 0, -0.517601), (-0.138183, 0, -0.552734), (-0.184245, 0, -0.552734), (-0.230306, 0, -0.552734),\
                                       (-0.276367, 0, -0.552734), (-0.184245, 0, -0.644856), (-0.0921223, 0, -0.736978), (0, 0, -0.829101), (0.0921223, 0, -0.736978),\
                                       (0.184245, 0, -0.644856), (0.276367, 0, -0.552734), (0.230306, 0, -0.552734), (0.184245, 0, -0.552734), (0.138183, 0, -0.552734),\
                                       (0.138183, 0, -0.517258), (0.138183, 0, -0.481783), (0.138183, 0, -0.446308), (0.210563, 0, -0.425433), (0.344876, 0, -0.345998),\
                                       (0.424597, 0, -0.211972), (0.447312, 0, -0.14009), (0.480289, 0, -0.138183), (0.516511, 0, -0.138183), (0.552734, 0, -0.138183),\
                                       (0.552734, 0, -0.184245), (0.552734, 0, -0.230306), (0.552734, 0, -0.276367), (0.644856, 0, -0.184245), (0.736978, 0, -0.0921223),\
                                       (0.829101, 0, 0), (0.736978, 0, 0.0921223), (0.644856, 0, 0.184245), (0.552734, 0, 0.276367), (0.552734, 0, 0.230306), (0.552734, 0, 0.184245),\
                                       (0.552734, 0, 0.138183), (0.517927, 0, 0.138183), (0.48312, 0, 0.138183), (0.448313, 0, 0.138183), (0.42423, 0, 0.212588), (0.344645, 0, 0.346051),\
                                       (0.210824, 0, 0.425278), (0.138233, 0, 0.447895), (0.138183, 0, 0.481828), (0.138183, 0, 0.517281), (0.138183, 0, 0.552734), (0.184245, 0, 0.552734),\
                                       (0.230306, 0, 0.552734), (0.276367, 0, 0.552734), (0.184245, 0, 0.644856), (0.0921223, 0, 0.736978), (0, 0, 0.829101), (-0.0921223, 0, 0.736978),\
                                       (-0.184245, 0, 0.644856), (-0.276367, 0, 0.552734), (-0.230306, 0, 0.552734), (-0.184245, 0, 0.552734), (-0.138183, 0, 0.552734), (-0.138183, 0, 0.517349),\
                                       (-0.138183, 0, 0.481964), (-0.138183, 0, 0.446579), (-0.211177, 0, 0.425069), (-0.347107, 0, 0.344477), (-0.427019, 0, 0.207866), (-0.449357, 0, 0.133453),\
                                       (-0.481244, 0, 0.138183), (-0.516989, 0, 0.138183), (-0.552734, 0, 0.138183), (-0.552734, 0, 0.184245), (-0.552734, 0, 0.230306), (-0.552734, 0, 0.276367),\
                                       (-0.644856, 0, 0.184245), (-0.736978, 0, 0.0921223), (-0.829101, 0, 0), (-0.736978, 0, -0.0921223), (-0.644856, 0, -0.184245), (-0.552734, 0, -0.276367),\
                                       (-0.552734, 0, -0.230306), (-0.552734, 0, -0.184245), (-0.552734, 0, -0.138183), (-0.518383, 0, -0.138183), (-0.484033, 0, -0.138183), (-0.448148, 0, -0.137417)],\
                                       k=[0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,\
                                          52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 86, 86],d=3))
        
        cogCross.scale.set(7.224,7.224,7.224)
        pm.makeIdentity(cogCross,apply=True,s=1,r=1,t=1,n=0)
        for cvIndex in [4,22,26,44,29,41,48,66,51,63,60,54,38,32,0,70,88,82,76,73,85,10,16,7,19,13,35,79,57] :  
            cogCrossShape = cogCross.getShape()
            cvString = '%s.cv[%s]'%(cogCrossShape.name(),cvIndex)
            pm.hardenPointCurve(cvString,ch=False,m=-1,rpo=True)
        cogCross.rename(name)
        return cogCross
        
    